﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using GalaSoft.MvvmLight.Command;
using GENERIC.MVVM.Interfaces.ViewModels;

namespace GENERIC.MVVM.ViewModels
{
    public abstract class ClosableViewModel : GENERIC.ViewModels.ViewModel, IClosableViewModel
    {
        #region Members

        private ICommand _closeCommand;
        private string _title;

        #endregion
        
        #region Constructor

        #endregion

        #region Properties

        public ICommand CloseCommand
        {
            get { return _closeCommand ?? (_closeCommand = new RelayCommand(Close, CanClose)); }
        }

        public virtual string Title
        {
            get { return _title; }
            set { Set<string>(() => Title, ref _title, value); }
        }

        #endregion

        #region Methods

        public virtual bool CanClose()
        {
            throw new NotImplementedException();
        }

        public virtual void Close()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
